package com.txra.txramall.user.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import com.txra.txramall.order.entity.OrderEntity;
import com.txra.txramall.user.service.UserService;

@RestController
@RequestMapping("/user")
public class UserController {

	@Autowired
	private UserService userService;
	

    @RequestMapping(value = "/findOrderByUserId/{id}", method = RequestMethod.GET)
    public List<OrderEntity>  findOrderByUserId(@PathVariable("id") Integer userId) {
    	
    	return userService.query(userId);
       
    	
    }



}
